import {ref, onMounted} from 'vue'
import {getBannerAPI} from '@/apis/home'
// 封装轮播图相关的代码
export function useBanner(){
  const bannerList = ref([])

  const getBanner = async ()=>{
    const res = await getBannerAPI();
    console.log(res);
    bannerList.value = res.result;
  }

  onMounted(()=>getBanner({distributionSite: '2'}))

  return {
    bannerList
  }
}
